#ifndef SHOP_H
#define SHOP_H
#include "dboperator.h"
#include "alert.h"
#include <QWidget>
#include <QMessageBox>

namespace Ui {
class Shop;
}

class Shop : public QWidget
{
    Q_OBJECT

public:
    explicit Shop(QWidget *parent, int id);
    ~Shop();

    void closeEvent(QCloseEvent *);

    bool canBuy();

signals:
    ExitShop();     // 关闭信号槽

private slots:

    void on_closebtn_clicked();

    void on_s1_clicked();

    void on_s2_clicked();

    void on_s3_clicked();

    void on_s4_clicked();

    void on_s5_clicked();

    void on_s6_clicked();

    void updateCoin1();

    void updateCoin2();

    void updateCoin3();

    void updateCoin4();

    void updateCoin5();

    void updateCoin6();

    void getnewItem(int no);

private:
    Ui::Shop *ui;
    int id;
    DbOperator* dbase;
    container msg;
    alert* a;
    QWidget *parent;
};

#endif // SHOP_H
